package service

import (
	"github.com/go-kratos/kratos/v2/log"
	"github.com/google/wire"
	v1 "stwin.net/api/st-demo/demoV1"
	"stwin.net/demo/internal/biz"
	"stwin.net/demo/internal/conf"
	"stwin.net/zoro/zconfig"
)

// 文件整体无需改动

var ProviderSet = wire.NewSet(NewServer)

type DemoService struct {
	v1.UnimplementedDemoServer // TODO：修改为自己的 server
	log                        *log.Helper
	uc                         *biz.Usecase
	conf                       *conf.Custom
}

func NewServer(bs zconfig.IZoroConfig, uc *biz.Usecase, logger log.Logger) *DemoService {
	return &DemoService{
		log:  log.NewHelper(logger),
		uc:   uc,
		conf: bs.HotKey().(*conf.Custom),
	}
}
